package day_2022_12_to_3.year2023;

/**
 * @author haomin
 * @date 2023/02/15 21:58
 **/
public class Day2_15_Num1250 {
    class Solution {
        public boolean isGoodArray(int[] nums) {
            int n=nums[0];
            for(int num:nums){
                n=gcd(n,num);
            }
            return n==1;

        }
        public int gcd(int a,int b){
            return a==0?b:gcd(b%a,a);
        }
    }
}